package com.nanyang.tms.service.bill.impl.flow;

import com.nanyang.common.core.domain.ApiRequest;
import com.nanyang.common.core.flow.context.TransHandlerContext;
import com.nanyang.common.core.flow.convert.TransConvert;
import com.nanyang.common.tool.utils.convert.BeanUtils;
import com.nanyang.tms.api.dto.request.bill.BillSolveRequest;
import com.nanyang.tms.domain.bill.context.BillSolveContext;

public class BillConvert implements TransConvert {
    @Override
    public TransHandlerContext convertRequest2Ctx(ApiRequest req, TransHandlerContext context) {
        BillSolveRequest billSolveRequest=(BillSolveRequest)req;
        BillSolveContext billSolveContext =(BillSolveContext) context;
        BeanUtils.copyProperties(billSolveRequest, billSolveContext.getBillUpdateContext());
        return billSolveContext;
    }
}
